<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('社保信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>姓名：</label>
                                <input type="text" name="name"/>
                            </li>
                            <li>
                                <label>性别：</label>
                                <select name="sex">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>年龄：</label>
                                <input type="text" name="age"/>
                            </li>
                            <li>
                                <label>总金额：</label>
                                <input type="text" name="total"/>
                            </li>
                            <li>
                                <label>月缴纳：</label>
                                <input type="text" name="month"/>
                            </li>
                            <li>
                                <label>身份证号：</label>
                                <input type="text" name="idNo"/>
                            </li>
                            <li>
                                <label>手机号：</label>
                                <input type="text" name="iphone"/>
                            </li>
                            <li>
                                <label>省：</label>
                                <input type="text" name="province"/>
                            </li>
                            <li>
                                <label>市：</label>
                                <input type="text" name="city"/>
                            </li>
                            <li>
                                <label>县：</label>
                                <input type="text" name="county"/>
                            </li>
                            <li>
                                <label>街道：</label>
                                <input type="text" name="street"/>
                            </li>
                            <li>
                                <label>社区：</label>
                                <input type="text" name="community"/>
                            </li>
                            <li>
                                <label>累计缴纳时长：</label>
                                <input type="text" name="duration"/>
                            </li>
                            <li>
                                <label>出生日期：</label>
                                <input type="text" name="birthday"/>
                            </li>
                            <li>
                                <label>缴纳单位：</label>
                                <input type="text" name="unit"/>
                            </li>
                            <li>
                                <label>缴费基数：</label>
                                <input type="text" name="base"/>
                            </li>
                            <li>
                                <label>个人缴纳金额：</label>
                                <input type="text" name="personal"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:info:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:info:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:info:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:info:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:info:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:info:remove')}]];
        var viewFlag = [[${@permission.hasPermi('system:info:view')}]];
        var prefix = ctx + "system/info";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                viewUrl: prefix + "/view/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "社保信息",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '',
                    visible: false
                },
                {
                    field: 'name',
                    title: '姓名'
                },
                {
                    field: 'sex',
                    title: '性别'
                },
                {
                    field: 'age',
                    title: '年龄'
                },
                {
                    field: 'total',
                    title: '总金额'
                },
                {
                    field: 'month',
                    title: '月缴纳'
                },
                {
                    field: 'idNo',
                    title: '身份证号'
                },
                {
                    field: 'iphone',
                    title: '手机号'
                },
                {
                    field: 'province',
                    title: '省'
                },
                {
                    field: 'city',
                    title: '市'
                },
                {
                    field: 'county',
                    title: '县'
                },
                {
                    field: 'street',
                    title: '街道'
                },
                {
                    field: 'community',
                    title: '社区'
                },
                {
                    field: 'duration',
                    title: '累计缴纳时长'
                },
                {
                    field: 'birthday',
                    title: '出生日期'
                },
                {
                    field: 'unit',
                    title: '缴纳单位'
                },
                {
                    field: 'base',
                    title: '缴费基数'
                },
                {
                    field: 'personal',
                    title: '个人缴纳金额'
                },
                {
                    title: '操作',
                    align: 'center',
                    width: 200,
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-primary btn-xs ' + viewFlag + '" href="javascript:void(0)" onclick="$.operate.view(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看</a> ');
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>